package order.controller;

import order.model.OrderInfo;
import order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:TQ02
 * Data:2024-07-18
 * Time:13:00
 * Text：
 */
@RequestMapping("/order")
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @RequestMapping ("/{orderId}")
    public OrderInfo getOrderById(@PathVariable("orderId")Integer orderId){
        return orderService.selectOrderById(orderId);
    }


}
